Skip to content

Conversation

@jeffdaily
Copy link
Collaborator

cherry pick of upstream pytorch#161221.

HIPAllocatorMasqueradingAsCUDA and HIPCachingAllocatorMasqueradingAsCUDA are now proper complete wrappers of HIPAllocator and HIPCachingAllocator, respectively. HIPAllocatorMasqueradingAsCUDA now subclasses HIPAllocator instead of Allocator. This fixes usability of hipify replacing c10::cuda::CUDACachingAllocator::get() where callers expect a CUDAAllocator to be returned but instead were getting a very thin Allocator shim instead.

This also fixes using cudagraph trees with torch compile. The hip:0 device was not being replaced by the cuda:0 device in all methods.

Pull Request resolved: pytorch#161221
Approved by: https://github.com/jeffdaily

Co-authored-by: Jeff Daily <[email protected]>
@rocm-repo-management-api
Copy link

rocm-repo-management-api bot commented Sep 2, 2025

Jenkins build for 03694d1e0bba4dd5fc29be8229296f4eaf7f1bfb commit finished as FAILURE
Links: Blue Ocean view / Build artifacts

@pruthvistony pruthvistony merged commit 9596b8b into release/2.8 Sep 3, 2025
40 of 42 checks passed
@pruthvistony pruthvistony deleted the release/2.8_cherry_pick_161221 branch September 3, 2025 16:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants